package com.jumper.property.comparer.core.context;

import com.jumper.property.comparer.core.result.User;
import lombok.Getter;
import lombok.Setter;

/**
 * 变更数据日志上下文
 * T 标识类型
 */
@Getter
@Setter
public class DataChangeContext extends Context {
    /**
     * 对象类型
     */
    private Class<?> cls;
    /**
     * 操作名称
     */
    private String optName;
    /**
     * 操作前对象
     */
    private Object beforeData;
    /**
     * 操作后对象
     */
    private Object afterData;

    public DataChangeContext(String optDataKey, String optName, Class<?> cls, Object beforeData, Object afterData, User user) {
        super(optDataKey, user);
        this.optName = optName;
        this.beforeData = beforeData;
        this.afterData = afterData;
        this.cls = cls;
    }
}
